import { ref } from 'vue'
import { findBanner } from '@/api/home'

export default function useBanner () {
  const bannerList = ref([])
  // 获取轮播图列表
  async function getBannerList () {
    const res = await findBanner()
    bannerList.value = res.result
  }

  getBannerList()

  return { bannerList }
}
